#include "head.h"
void pyramid()
{
    int fl;
    while (1)
    {
        puts("输出你想要几层的金字塔");
        scanf("%d", &fl);
        for (size_t i = 0; i < fl; i++)
        {
            for (size_t j = i; j < fl; j++)
            {
                printf(" ");
            }
            for (size_t k = 0; k < 2*i+1; k++)
            {
                printf("*");
            }
            puts("");
        }
        if (fl==0)break;
    }
}